Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove accesses to global placement state during placement stage #2669

Merged
merged 81 commits into from
Aug 20, 2024

Conversation

soheilshahrouz
Copy link
Contributor

This PR removes all accesses to g_vpr.placement() member variables that contain information about block locations and are subject to change during the placement stage. Block location information is instead stored in a local object that is copied into the global placement state at the end of the placement stage.

Motivation and Context

Using local objects to store block locations is the first step to run multiple instances of annealer in parallel. With this PR, each annealer can have its own block_locs, grid_blocks, and pin_locations.

How Has This Been Tested?

In progress

Types of changes

  • Bug fix (change which fixes an issue)
  • New feature (change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My change requires a change to the documentation
  • I have updated the documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed

@soheilshahrouz
Copy link
Contributor Author

@vaughnbetz and @AlexandreSinger
The code is ready for review

Copy link
Contributor

@AlexandreSinger AlexandreSinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @soheilshahrouz this looks good to me. I left some non-functional comments.

vpr/src/draw/manual_moves.h Outdated Show resolved Hide resolved
vpr/src/place/RL_agent_util.h Outdated Show resolved Hide resolved
vpr/src/place/initial_noc_placment.h Outdated Show resolved Hide resolved
vpr/src/place/initial_noc_placment.h Outdated Show resolved Hide resolved
vpr/src/util/vpr_utils.cpp Outdated Show resolved Hide resolved
vpr/src/util/vpr_utils.h Outdated Show resolved Hide resolved
Copy link
Contributor

@vaughnbetz vaughnbetz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly ensuring Doxygen comments are up to date ...

@@ -712,7 +712,7 @@ bool TimingReporter::nearly_equal(const Time& lhs, const Time& rhs) const {

size_t TimingReporter::estimate_point_print_width(const TimingPath& path) const {
size_t width = 60; //default
for(auto subpath : {path.clock_launch_path(), path.data_arrival_path(), path.clock_capture_path()}) {
for(const auto& subpath : {path.clock_launch_path(), path.data_arrival_path(), path.clock_capture_path()}) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pushing back to tatum is OK; it's leading user is VTR. But I agree this should be pushed back if you change it.

vpr/src/base/vpr_types.h Outdated Show resolved Hide resolved
vpr/src/draw/draw.h Show resolved Hide resolved
vpr/src/draw/draw_global.cpp Show resolved Hide resolved
vpr/src/draw/draw_types.h Show resolved Hide resolved
vpr/src/place/place_util.h Outdated Show resolved Hide resolved
vpr/src/place/place_util.h Outdated Show resolved Hide resolved
vpr/src/place/place_util.h Outdated Show resolved Hide resolved
vpr/src/place/place_util.h Outdated Show resolved Hide resolved
vpr/src/place/place_util.h Show resolved Hide resolved
Copy link
Contributor

@vaughnbetz vaughnbetz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few more commenting suggestions and maybe some code motion. Thanks for the huge refactoring!

vpr/src/place/placer_context.h Outdated Show resolved Hide resolved
vpr/src/place/placer_context.h Show resolved Hide resolved
vpr/src/place/timing_place.h Show resolved Hide resolved
vpr/src/timing/VprTimingGraphResolver.h Show resolved Hide resolved
vpr/src/util/vpr_utils.h Show resolved Hide resolved
vpr/src/util/vpr_utils.h Show resolved Hide resolved
vpr/src/util/vpr_utils.h Outdated Show resolved Hide resolved
vpr/src/util/vpr_utils.h Outdated Show resolved Hide resolved
@vaughnbetz
Copy link
Contributor

vaughnbetz commented Aug 12, 2024

CI is down. How about you run VTR and Titan again to make sure they're still fine (almost certainly are); if they look good go ahead and merge. Also, please push back Tatum.

@vaughnbetz
Copy link
Contributor

Re-launched CI.

@soheilshahrouz
Copy link
Contributor Author

@vaughnbetz
CI passed. Ready to be merged.

@vaughnbetz vaughnbetz merged commit 78c89f5 into master Aug 20, 2024
53 checks passed
@vaughnbetz vaughnbetz deleted the temp_place_ref branch August 20, 2024 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external_libs lang-cpp C/C++ code VPR VPR FPGA Placement & Routing Tool
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants